import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/views/layout/index.vue'),
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/home/index.vue'),
      },
      {
        path: '/design',
        name: 'design',
        component: () => import('@/views/design/index.vue'),
      },
      // 交流互动
      {
        path: '/chat',
        name: 'chat',
        component: () => import('@/views/chat/index.vue'),
      },
      // 推广
      {
        path: '/spread',
        name: 'spread',
        component: () => import('@/views/spread/index.vue'),
      },
      {
        path: '/spreadDetail',
        name: 'spreadDetail',
        component: () => import('@/views/spread/detail.vue'),
      },
    ],
  },
  {
    path: '/template',
    component: () => import('@/views/template/index.vue'),
  },
];

export default routes;
